package com.link2room.cms.service;

import com.link2room.cms.dto.result.ArticleBaseDto;
import com.link2room.cms.entity.ArticleBase;
import com.link2room.cms.entity.ArticleDetail;
import com.link2room.common.jpa.result.QueryResult;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author sqj88
 * @date 2017/12/1 11:17
 */
public interface IArticleService {

    @Transactional
    void saveOrUpdateArticle(ArticleBase articleBase, ArticleDetail articleDetail)throws Exception;

    @Transactional
    void deleteArticle(String lhotelGroupCode, Long id)throws Exception;

    QueryResult<ArticleBaseDto> findArticleList(String lhotelGroupCode,
                                                String categoryCode,
                                                String isHalt,
                                                String isAudit,
                                                String language,
                                                String articleType,
                                                String keyword,
                                                Integer currentPage,
                                                Integer pageSize)throws Exception;

    void updateClickCount(String lhotelGroupCode,
                          String articleId,
                          String language)throws Exception;
}
